package com.hobee.basic.service.impl;

import com.hobee.basic.config.datasource.DataSourceAnnotation;
import com.hobee.basic.mapper.BdModulMapper;
import com.hobee.basic.model.BdModul;
import com.hobee.basic.service.ModulService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author junjie.li
 * @date 2020/6/30 14:31
 */
@Service
public class ModulServiceImpl implements ModulService {

    @Autowired
    private BdModulMapper mapper;

    @Override
    public BdModul findById(String modulId) {
        return mapper.selectByPrimaryKey(modulId);
    }

    @Override
    @DataSourceAnnotation
    public void updateBySelective(BdModul modul) {
        mapper.updateByPrimaryKeySelective(modul);
    }
}
